package highlight_spring4.web.ch4_4;

import highlight_spring4.domain.DemoObj;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName AdviceController
 * @Package highlight_spring4.web.ch4_4
 * @Description TODO
 * @Author zjb
 * @Date 2018/7/25 14:29
 * @Version 1.0
 **/
@Controller
public class AdviceController {
    @RequestMapping("advice")
    //1
    public String getSomething(@ModelAttribute("msg") String msg, DemoObj obj){
        throw new IllegalArgumentException("非常抱歉，参数有误/"+"来自@ModelAttribute: " + msg);
    }
}
